home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shw_div2ext_commies.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  89 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SHW_CommieCreator.cog
  4. #
  5. # Creates a bunch of enemies after various events in the waterworks
  6. #
  7. # [CM]
  8. #
  9. # (C) 1998 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.  
  14.     #    MESSAGES
  15.     message     startup
  16.     message     taken
  17.     message     entered
  18.     
  19.     #    TRIGGERS
  20.     sector        triggersect        
  21.     thing        D3key        
  22.     
  23.     #    ACTORS
  24.     thing        player      local
  25.     thing        enemy0        nolink          
  26.     thing        enemy1      nolink    
  27.     
  28.     #    ACTOR MARKS
  29.     thing        enemy_mv0
  30.     thing        enemy_mv1
  31.     
  32.     #    SOUNDS
  33.     sound        dangercue1=mus_gen_russbold_shrt4.wav    local
  34.     
  35.     #    VARIABLES
  36.     int         keytook=0      local
  37.     int         charged=0      local
  38.  
  39. end
  40.  
  41. # ========================================================================================
  42. code
  43.  
  44. startup:
  45.     
  46.         player = GetLocalPlayerThing();
  47.         SetThingFlags(enemy0, 0x80000);
  48.         SetThingFlags(enemy1, 0x80000);
  49.         
  50. return;
  51. # ........................................................................................
  52. taken:
  53.  
  54.     If (GetSenderRef() == D3key)
  55.     keytook = 1;
  56.     
  57. return;
  58. # ........................................................................................
  59. # ........................................................................................
  60. entered:
  61.     
  62.     If (GetSenderRef() != triggersect) return;
  63.     If (keytook == 0) return;
  64.     If (charged == 1) return;
  65.         
  66.     
  67.     charged = 1;
  68.     PlaySoundLocal(dangercue1, 1.0, 0.0, 0x0, 0);
  69.     
  70.     Sleep(0.5);
  71.     # bring the commie into play and charge him in
  72.     ClearThingFlags(enemy0,0x80000);
  73.     AISetLookThing(enemy0, enemy_mv0);
  74.     AISetMoveSpeed(enemy0, 3.2);
  75.     AISetMoveThing(enemy0, enemy_mv0, 0);
  76.  
  77.     ClearThingFlags(enemy1,0x80000);
  78.     AISetLookThing(enemy1, enemy_mv1);
  79.     AISetMoveSpeed(enemy1, 1.0);
  80.     AISetMoveThing(enemy1, enemy_mv1, 1);
  81.  
  82. return;
  83.  
  84. # ........................................................................................
  85.  
  86. end
  87.  
  88.  
  89.